package com.xjj.datarources.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xjj.datarources.dao.PermissionMapper;
import com.xjj.datarources.pojo.SysPermission;
import com.xjj.datarources.service.PermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @name: xjj
 * @date: 2021/5/25 16:03
 */
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, SysPermission> implements PermissionService {

    @Resource
    private PermissionMapper permissionMapper;

    @Override
    public List<SysPermission> getPermissionsByRid(Integer id) {

/*        QueryWrapper<SysPermission> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("rid", id);
        return permissionMapper.selectList(queryWrapper);*/
     return permissionMapper.getPermission(id);

    }
}
